package no.ntnu.fp.watch.gui;

import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.util.Vector;

import javax.swing.DefaultListCellRenderer;
import javax.swing.JLabel;
import javax.swing.JList;


public class LogFilRenderer extends DefaultListCellRenderer {
	
	public Component getListCellRendererComponent(JList list, Object value,
			int index, boolean isSelected, boolean cellHasFocus) 
	{
		Vector<Object> v = (Vector<Object>)value;
		
		JLabel label = (JLabel)super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
		
		label.setFont(new Font("Times", Font.BOLD, 14));
		label.setText("<html>"+v.get(0) +"     |    "+v.get(1)+"    |    "+v.get(2)+"    |    "+v.get(3)+ "    |    "+v.get(4)+"  |  " +
				v.get(5)+"     |    "+v.get(7)+ "</html>");
		
		return label;
	}
	
}